//! \file sharedobject.hpp
//! \brief Purewell Library Shared Object Header
//! \author Yubin Lim (purewell@gmail.com)
//! \since 2008-01-25

#ifndef __SHAREDOBJECT_HPP__
#define __SHAREDOBJECT_HPP__

namespace purewell
{

//! \brief Shared object. It's so or dll file.
class PWSharedObject
{
public:
	//! \brief Open object from path.
	//! \param[in] path Object path.
	//! \param[in] type Open type.
	//! \return On success, true.
	bool initialize(const char* path, int type);

	//! \brief Close object.
	void destroy(void);

	//! \brief Get symbol pointer from object.
	//! \param[in] symbol Symbol name.
	//! \return On success, symbol pointer or NULL.
	void* getSymbol(const char* symbol);

public:
	explicit PWSharedObject();
	virtual ~PWSharedObject();

private:
	explicit PWSharedObject(const PWSharedObject&) {}
	PWSharedObject& operator = (const PWSharedObject&) {return *this;}

private:
	void* m_pData;	//!< Data
};

};//namespace purewell

#endif//!__SHAREDOBJECT_HPP__

